package com.feiluan.listener;

import com.feiluan.config.mqtt.MQTTSubcriberConfig;
import com.feiluan.mqtt.subscriber.MQTTSubscriberBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Component
public class MqttMessageListener implements Runnable {

    @Autowired
    MQTTSubscriberBase subscriber;

    @Override
    public void run() {
        subscriber.subscribeMessage(MQTTSubcriberConfig.topic);
    }

}
